package com.hdax.dm.api.base.controller;

import com.hdax.dm.api.base.ImageControllerApi;
import com.hdax.dm.dto.base.CarouselDto;
import com.hdax.dm.entity.base.Image;
import com.hdax.dm.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ImageController implements ImageControllerApi {

    @Autowired
    private ImageService imageService;

    @Override
    public Image image(Long targetId,Long type,Long category) {
        return imageService.findImage(targetId, type, category);
    }

    @Override
    public List<CarouselDto> carousel() {
        return imageService.carousel();
    }
}
